<?php

define('WEBDIR', str_replace('\\', '/', substr(__FILE__, 0, -9))); //��վ��Ŀ¼

define('DEBUG', 'yes');

if ('yes' == DEBUG) {///����ģʽ

    error_reporting(E_ERROR | E_WARNING | E_PARSE);
} else {

  //  error_reporting(0);
}

 

include('./system/yoyoPHP.php');
define('WEB', str_replace(WWWROOT, '',WEBDIR));

$temp = '';

$_SERVER['SCRIPT_NAME'] ? $temp = $_SERVER['SCRIPT_NAME'] : $temp = $_SERVER['PHP_SELF'];
if (!empty($_SERVER['REQUEST_URI'])) {
    $temp = urldecode($_SERVER['REQUEST_URI']);
    if (strpos($temp, '<') !== false || strpos($temp, '"') || strpos($temp, "'") !== false)
        exit('Request Bad url');
}



define('BASEPATH', ''); ///Ŀ¼������������
BASEPATH != '' && $temp = str_replace(BASEPATH, '', $temp);

preg_match('/(\w*)\/index\.php/', $temp, $f);
;


$f[1] == '' && $f[1] = 'index';
define('APP', $f[1]);





$_config = array();
new ini();
 
new route();


 
?>
